# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kompare
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kde.org/applications/development/org.kde.kompare"
pkgdesc="Graphical File Differences Tool"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kcoreaddons-dev kcodecs-dev kdoctools-dev kiconthemes-dev kjobwidgets-dev kconfig-dev kparts-dev ktexteditor-dev kwidgetsaddons-dev libkomparediff2-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kompare-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="5eb80a8e6aaa4bc05b24297f86ef5bb018f078a62d7eb99345ba49b0d95fe637eef75df0c5caf469c75f0b32c5d8afa6b40f10e3f3c9f2730a71469ead446ba2  kompare-20.04.3.tar.xz"
